package com.yang.webapi.module.service.impl;

import com.yang.service.api.ShopService;
import com.yang.service.model.dto.get.ShopGetDTO;
import com.yang.service.model.dto.post.ShopPostDTO;
import com.yang.service.model.dto.put.ShopPutDTO;
import com.yang.service.model.vo.ShopVO;
import com.yang.webapi.module.service.ShopWebService;
import com.zhy.base.service.page.PageResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by xin7k
 * Date: 2019/12/4 0004
 */
@Slf4j
@Service
public class ShopWebServiceImpl implements ShopWebService {
    @Autowired
    private ShopService shopService;

    @Override
    public ShopVO selectById(String id) {
        return shopService.selectById(id);
    }

    @Override
    public List<ShopVO> selectList(ShopGetDTO dto) {
        return shopService.selectList(dto);
    }

    @Override
    public String save(ShopPostDTO dto) {
        return shopService.save(dto);
    }

    @Override
    public boolean update(String id, ShopPutDTO dto) {
        return shopService.update(id, dto);
    }

    @Override
    public boolean deleteById(String id) {
        return shopService.deleteById(id);
    }

    @Override
    public boolean saveBatch(List<ShopPostDTO> dtos) {
        return shopService.saveBatch(dtos);
    }

    @Override
    public boolean deleteBatch(List<String> ids) {
        return shopService.deleteBatch(ids);
    }

    @Override
    public PageResult<ShopVO> getPriorityShop(Integer number){
        return shopService.getPriorityShop(number);
    }

    @Override
    public ShopVO getShopByShopId(String shopId) {
        return shopService.selectById(shopId);
    }

}
